Running from the Command Line

You can run spreadsheet reports from the command line, to run automated status reports, or automatically feed aPriori data into another application or database.

Reports run from the command line do not need to be installed in aPriori prior to use. You specify the pathname to the .xml input and .xls output files. Note that you should specify any .xls template file with the templatePath attribute to the reports tag at the top of the .xml file, for example,

<reports traverseAssemblies="true" templatePath="C:\aPriori_templates\report.template.xls">

Otherwise the output .xls file is unformatted; any existing content overwritten.

runAprioriReport.cmd

To generate spreadsheet reports from the command line, run the runAprioriReport.cmd command from your bin, directory, in:

apriori_install\version\install\bin

Syntax

runAprioriReport.cmd co_type co_name xml_report_file xls_output_file
[ scenario_name ]username "password"

Arguments

  • co_type: Component type - part, assembly, rollup, or dynamicRollup.

  • co_name: Component name.

  • xml_report_file: Full pathname to the XML spreadsheet report definition file.

  • xls_output_file : Full path name to the Excel file to be populated.

  • scenario_name [Optional] : If scenario_name is omitted, "initial" is assumed.

  • username : aPriori log-in account name to use for this report session.

  • password : Associated aPriori password.

Examples

To run a custom report named "XYZ" that resides in folder named C:\Files, from the command line, and generate an Excel file named results in the same folder, for a part named "r5":

runAprioriReport.cmd part R5 C:\Files\XYZ.watchpoints.xml C:\Files\results.xls initial user1 user1passwd

To run the system-defined Cost Driver report from the command line and generate an Excel spreadsheet in a folder named files, for a part named R6:

runAprioriReport.cmd part R6 “apriori_install\ext\cost-watchpoint-report\watchpoints\Cost Driver.watchpoints.xml” c:\files\results.xls initial user1 user1passwd

Notes

  • If the optional scenario_name argument is used; it must precede any username and password credentials. For any existing scripts from releases prior to 2018 R1, you must ensure that these arguments follow the new ordering when upgrading.

  • If username and password are not specified as arguments on the command line, the report utility looks for them in the properties file. If they are not found, and if your aPriori administrator has implemented Single Sign On (SSO), the report utility attempts to use the currently logged-in user’s Windows credentials.

  • The runAprioriReport.cmd command script assumes a deployment named Default, and a scenario schema named Default Scenarios. If you have altered these values, edit the configured other deployments, edit the runAprioriReport.cmd script and update these lines:

    • set APRIORI_DEPLOYMENT_NAME=Default

    • set APRIORI_SCENARIO_SCHEMA_NAME=”Default Scenarios”

  • When an aPriori account password is specified as an argument on the command line, as a best practice, wrap the password in double quotes.